package org.skycastle.megastructure

import com.jme.bounding.BoundingBox
import com.jme.scene.shape.Box
import com.jme.math.Vector3f
import com.jme.scene.Node
import com.jme.system.DisplaySystem

/**
 *
 *
 * @author Hans Haggstrom
 */

class Figure( height : Float ) extends Appearance {

  protected def createSpatial(display : DisplaySystem) = {

    val b = new Box("box", new Vector3f(), 0.35f, height, 0.5f);
    b.setModelBound(new BoundingBox())
    b.updateModelBound()

    val figure = new Node("Figure Node")
    figure.setLocalTranslation(new Vector3f(100, 0, 100))
    figure.attachChild(b)
    figure.updateWorldBound

    figure
  }
}